Page History: MarketData Snapshot
Compare Page Revisions
Page Revision: 2016/06/15 17:54
Describing Market DataThe T4 FIX API support streaming of market data with the Market Data Snapshot message (Tag 35=W).
The Market Data Snapshot messages are used as the response to a
Market Data Request message. It can be used to transmit a list of quotes, a list of trades, index values, opening, closing, settlement, high, low, the trade volume or open interest for a security, or any combination of these. Market Data Snapshot messages sent as the result of a
Market Data Request message will specify the corresponding MDReqID (Tag 262). Unsolicited Market Data Snapshot messages may also be received by a T4 FIX client.
The Market Data message format used for a Snapshot (Tag 263=0) , or a Snapshot + Updates (Tag 263=1) is as follows: For Market Data Requests where a Bid or Offer is added, changed, or deleted, every update to a Market Data Entry results in a new Market Data message that contains the entirety of the data requested for that instrument, not just the changed Market Data Entry. In other words, both sides of the market, or just one side in the case of a request of only bids or offers, for the depth requested, is sent in one Market Data Snapshot message.
Matching Snapshots against Market Data RequestsMarket Data Snapshot messages can be matched (by the FIX API client) through either the (unique) SecurityID (Tag 48) or by the Request ID (MDReqID - Tag 262) of the
Market Data Request that initiated the streaming. SecurityID (Tag 48) is the default identification mechanism. If the client requests to identify by MDReqID, the SecurityID will not be included in the market data snapshot message (and viceversa).
Chart Data ResponsesThe Market Data SnapShot message also carries Chart (Time-and-Sales) Data as requested with the
Market Data Request message. Chart Data details are included in the MDEntries.ChartData repeating group as labeled with the MDEntryType (Tag 269). Compression of Chart Data is optional. It is indicated by the ExecInst field equal to COMPRESSED_TAGS (18=T). Compressed data is carried as a (Base-64) encoded payload in the EncodedText field (Tag 255). Once uncompressed, this payload avails sequential chart data through the corresponding Tag-Value pairs (Tags 3206 to 3278).
Message DictionaryTag | Field Name | Req'd | Comments |
---|
| Standard Header | Y |
262 | MDReqID | N | Identifier of Market Data Request. |
48 | SecurityID | N | Security Identifier. T4 Market ID. |
55 | Symbol | N | Symbol. T4 Contract ID. |
207 | SecurityExchange | N | Security Exchange. T4 Exchange ID. |
387 | TotalVolumeTraded | N | Total quantity of volume traded across all levels. |
965 | SecurityStatus | N | Market Status of Security. For Chart Data, Status of Market Data Chart Request. Valid values are: |
| | | 0 = Undefined |
| | | 1 = PreOpen |
| | | 2 = Open |
| | | 3 = RestrictedOpen |
| | | 4 = PreClosed |
| | | 5 = Closed |
| | | 6 = Suspended |
| | | 7 = Halted |
| | | 8 = Failed (also Chart Data) |
| | | 9 = PreCross |
| | | 10 = Cross |
| | | 11 = Expired |
| | | 12 = Rejected |
| | | 13 = Unavailable |
| | | 14 = NoPermission (only Chart Data) |
| | | 15 = ExceedsLimit (only Chart Data) |
| | | 16 = Success (only Chart Data) |
3200 | TradeDateStart | N | Start Date of multiple-day Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4) and TIMEANDSALES_DATA_CONTRACT (263=5). Displayed in FIX UTCDateOnly format (e.g. 20131517). Date is local CST (Chicago) date and not relative to GMT. |
3201 | TradeDateEnd | N | End Date of multiple-day Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4). Displayed in FIX UTCDateOnly format (e.g. 20131517). Date is local CST (Chicago) date and not relative to GMT. |
3202 | SessionStartTime | N | Start of Session for a user-defined time-span of a Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4). Displayed in FIX UTCTimeOnly format (e.g. 14:11:01.887, 14:11:01). Time is local CST (Chicago) time and not GMT. |
3203 | SessionEndTime | N | End of Session for a user-defined time-span of a Chart Data request. Used for SubscriptionRequestTypes of TIMEANDSALES_DATA_BATCH (263=4). Displayed in FIX UTCTimeOnly format (e.g. 14:11:01.887, 14:11:01). Time is local CST (Chicago) time and not GMT. |
3204 | ChartType | N | Chart Type as pertaining to the (time) granularity of Chart Data Snapshot responses. Valid values are: |
| | | 0 = Tick |
| | | 1 = Second |
| | | 2 = Minute |
| | | 3 = Hour |
| | | 4 = Day |
| | | 5 = Time Price Opportunity (TPO) |
| | | 6 = TickChange |
3205 | DataFormat | N | The compression format of the response to the Chart Data request. Not applicable to Contract Chart Data requests (263=5). Valid values are: |
| | | U = UNCOMPRESSED. All Chart Data is returned as tags included in the MDEntries repeating group of the Market Data Snapshot message. |
| | | T = COMPRESSED_TAGS. All Chart Data is returned as a payload of compressed and Base-64 encoded Tag-Value pairs in the EncodedText field (Tag 355) of the Market Data Snapshot message. Compression is implemented with the Lempel-Ziv-Huffman (Deflate) algorithm. |
| | | Z = COMPRESSED_TAGS_ZLIB. All Chart Data is returned as a payload of compressed and Base-64 encoded Tag-Value pairs in the EncodedText field (Tag 355) of the Market Data Snapshot message. Compression is implemented with the ZLib library. |
| | | 2 = T4BIN. Internal representation of Chart Data store. |
268 | NoMDEntries | Y | Number of Market Data entries to follow |
| Start Repeating Group | |
269 | MDEntryType | Y | Market Data Entry Type. Must be the first field in this repeating group. Valid values are: |
| | | 0 = Bid |
| | | 1 = Offer |
| | | 2 = Implied Bid |
| | | 3 = Implied Offer |
| | | 4 = Last Trade |
| | | 6 = Settlement |
| | | 7 = Session High |
| | | 8 = Session Low |
| | | 9 = Session Open |
| | | K = Limit High |
| | | L = Limit Low |
| | | B = Trade Volume |
| | | X = Chart Data. Single day with a session time span. |
| | | Y = Chart Data Batch. Multiple days with a session time span. |
| | | Z = Chart Data Contract. Single day Total Traded Volume (TTV) for all markets of a contract. MarketId in Tag 278 with TTV in Tag 271. |
| | | U = Chart Data Day. Multiple days with no session time span. |
278 | MDEntryID | N | Market ID (of Chart Data Contract). |
270 | MDEntryPx | N | Entry Price. |
271 | MDEntrySize | N | Entry Size (or Volume). |
273 | MDEntryTime | N | Time for current entry. |
274 | TickDirection | N | Whether the trade occurred at the bid or offer. Only applicable when MDEntryType = LastTrade in trade snapshots. Valid values are: |
| | | 0 = AtTheOffer |
| | | 2 = AtTheBid |
277 | TradeCondition | N | Whether the trade occurred as a result of a spread. Only applicable when MDEntryType = LastTrade. Only valid value: AA = Due to Spread. |
18 | ExecInst | N | Execution Instruction as pertaining to the Compression Data Format. Valid Values are: |
| | | T = COMPRESSED_TAGS. Compressed Base-64 encoded tag-value pairs in EncodedText field (Tag 355). Compressed with Deflate's LZH. |
| | | Z = COMPRESSED_TAGS_ZLIB. Compressed Base-64 encoded tag-value pairs in EncodedText field (Tag 355). Compressed with Zlib library. |
| | | U = UNCOMPRESSED. Uncompressed Tag value pairs. |
| | | E = UNCOMPRESSED_ENCODED. Uncompressed Base-64 encoded data in EncodedText field (Tag 355). |
1023 | MDEntryLevel | N | Book level this entry pertains to; an integer value from 1 to 10. |
1020 | TradeVolume | N | Trade volume for this MDEntry. |
75 | TradeDate | N | Trade date for this MDEntry (format YYYYMMDD). |
3301 | OrderVolumes | N | Order Volumes that make up a trade (if available). Only applicable to MDEntryType = 4. Volumes are separated by a semicolon (";"). |
3210 | NoChartData | N | Number of Chart Data entries to follow |
| Start Repeating Group | |
3212 | Change | N | Chart Data Change associated with this Chart Data entry |
| | | 0 = None |
| | | 1 = Trade |
| | | 2 = Quote |
| | | 3 = MarketMode |
| | | 4 = Settlement |
| | | 5 = TradeBar |
| | | 6 = TradeDate |
| | | 7 = TPO (Time Price Opportunity) |
| | | 8 = TickChange |
| | | 9 = RFQ (Request for Quote) |
| | | 10 = HeldSettlement |
| | | 11 = ClearedVolume |
| | | 12 = OpenInterest |
| | | 13 = VWAP (Volume Weighted Average Pricing) |
| | | 15 = Market Definition |
3206 | Numerator | N | Price Numerator of security |
3207 | Denominator | N | Price Denominator of security |
3208 | PriceCode | N | Internal Price code of security |
3209 | TickValue | N | Price Tick Value of security |
3211 | TradeDateCharts | N | Trade Date for Chart Data Request (in UTCDateOnly format) |
3213 | MarketModeTime | N | Date-Time pertaining to this Market Mode Entry (in UTCTimestamp format) |
3214 | MarketMode | N | Market Mode for Chart Data Request |
3216 | SettlementTime | N | Date-Time pertaining to this Settlement Entry (in UTCTimestamp format) |
3217 | Settlement | N | Settlement for Chart Data Request |
3219 | HeldSettlementTime | N | Date-Time pertaining to this Held Settlement Entry (in UTCTimestamp format) |
3220 | HeldSettlement | N | Held Settlement for Chart Data Request |
3222 | OpenInterestTime | N | Date-Time pertaining to this Open Interest Entry (in UTCTimestamp format) |
3223 | OpenInterest | N | Open Interest for Chart Data Request |
3225 | ClearedVolumeTime | N | Date-Time pertaining to this Cleared Volume Entry (in UTCTimestamp format) |
3226 | ClearedVolume | N | Cleared Volume for Chart Data Request |
3228 | VWAPTime | N | Date-Time pertaining to this VWAP Entry (in UTCTimestamp format) |
3229 | VWAP | N | VWAP for Chart Data Request |
3231 | QuoteTime | N | Date-Time pertaining to this Quote Entry (in UTCTimestamp format) |
3232 | BidTicks | N | Bid Price in Ticks |
3233 | BidRealVolume | N | Bid Real Volume |
3234 | BidImpliedVolume | N | Bids Implied Volume |
3235 | OfferTicks | N | Offer Price in Ticks |
3236 | OfferRealVolume | N | Offer Real Volume |
3237 | OfferImpliedVolume | N | Offer Implied Volume |
3239 | TPOStartTime | N | Start Time pertaining to this TPO Entry (in UTCTimestamp format) |
3240 | TPOTicks | N | Price Ticks of TPO |
3241 | TPOVolume | N | Volume of TPO |
3242 | TPOVolumeAtBid | N | Volume at the Bid |
3243 | TPOVolumeAtOffer | N | Volume at the Offer |
3244 | TPOIsOpening | N | Transaction is opening for TPO (Y=Yes, N=No) |
3245 | TPOIsClosing | N | Transaction is closing for TPO (Y=Yes, N=No) |
3247 | TradeTime | N | Start Time pertaining to this Trade Entry (in UTCTimestamp format) |
3248 | TradeVolumeCharts | N | Trade Volume |
3249 | TradeTickValue | N | Price Tick Value for Trade |
3250 | TotalTradedVolume | N | Total Trade Volume |
3251 | DueToSpread | N | Whether the Trade corresponds to a Spread Strategy (Y=Yes, N=No) |
3252 | AtBidOrOffer | N | At Bid or Offer Transaction Type. Valid values are: |
| | | 1 = Buy |
| | | 2 = Sell |
3253 | TradeOrderVolumes | N | Order Volumes that make up a trade (if available). Only applicable to Change = 1. Volumes are separated by a semicolon (";"). |
3254 | BarStartTime | N | Start Time for this TradeBar Entry (in UTCTimestamp format) |
3255 | BarCloseTime | N | Close Time for this TradeBar Entry (in UTCTimestamp format) |
3256 | BarOpenTicks | N | TradeBar Open Price in Ticks |
3257 | BarHighTicks | N | TradeBar High Price in Ticks |
3258 | BarLowTicks | N | TradeBar Low Price in Ticks |
3259 | BarCloseTicks | N | TradeBar Close Price in Ticks |
3260 | BarVolume | N | TradeBar Total Volume |
3261 | BarBidVolume | N | TradeBar Bid Volume |
3262 | BarOfferVolume | N | TradeBar Offer Volume |
3263 | BarTradeCount | N | Total number of trades for this TradeBar |
3264 | BarTradesAtBid | N | Number of Trades at Bid for this TradeBar |
3265 | BarTradesAtOffer | N | Number of Trades at Offer for this TradeBar |
3267 | TickChangeStartTime | N | Start Time for this Tick Change Entry (in UTCTimestamp format) |
3268 | TickChangeCloseTime | N | Close Time for this Tick Change Entry (in UTCTimestamp format) |
3269 | TickChangeVolume | N | TickChange Total Volume |
3270 | TickChangeBidVolume | N | TickChange Bid Volume |
3271 | TickChangeOfferVolume | N | TickChange Offer Volume |
3272 | TickChangeTradeCount | N | Total number of trades for this TickChange |
3273 | TickChangeTradesAtBid | N | Number of Trades at Bid for this TickChange |
3274 | TickChangeTradesAtOffer | N | Number of Trades at Offer for this TickChange |
3276 | RFQTime | N | Start Time pertaining to this RFQ (in UTCTimestamp format) |
3277 | BuySell | N | Transaction Type for this RFQ. Valid values are: |
| | | 1 = Buy |
| | | 2 = Sell |
3278 | Volume | N | Volume for this RFQ |
| End Repeating Group | |
354 | EncodedTextLength | N | Length of Encoded Text. |
355 | EncodedText | N | Chart Data Only. Base-64 encoded text of compressed Chart Data tags. For the COMPRESSED_TAGS data format (Tag 18=T), it carries the encoded tag-value pairs of all Chart Data tags (Tag 3206 to Tag 3278 above). If compressed by Zlib, the compressed payload (as found in the EncodedText tag) is blocked in multiples of 30,000 bytes (regardless of the size of the MarketData SnapShot message). The start of such payload provides the size of all aggregated blocks (a 32-bit integer) and the number of subsequent blocks (a 16-bit integer). Each following block is preceded by its size (a 32-bit integer). |
3279 | EncodedTextCRC | N | The (Base-64 encoded) Addler-32bit Cyclic Redundancy Check (CRC) of the Uncompressed payload. Only available for Deflate compressed packages. This can be used to frame a Deflate stream for Zlib decompression per RFC 1950. To frame the Deflate stream, a header of 0x78, 0x9C can be used. |
| End Repeating Group | |
| Standard Trailer | Y |
Sample MessagesMarket Data Snapshot of Market with a 1 book level (Top of Book)
<< 10/11/2012 2:58:04 PM [fixmarketdatasnapshot] 34=11479|49=T4|56=T4Example|50=T4FIX|52=20121011-19:58:03.971|55=ZT|48=CME_20121200_ZTZ2|207=CME_F|387=4785|268=5|269=0|270=110.203125|271=224|1023=1|269=1|270=110.21875|271=326|1023=1|269=2|270=110.1875|271=1|1023=1|269=3|270=110.21875|271=3|1023=1|269=4|270=110.2109375|271=1|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 11479
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20121011-19:58:03.971
[Symbol] 55 = ZT
[SecurityID] 48 = CME_20121200_ZTZ2
[SecurityExchange] 207 = CME_F
[TotalVolumeTraded] 387 = 4785
[NoMDEntries] 268 = 5
[MDEntryType] 269 = 0 (BID)
[MDEntryPx] 270 = 110.203125
[MDEntrySize] 271 = 224
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 1 (OFFER)
[MDEntryPx] 270 = 110.21875
[MDEntrySize] 271 = 326
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 2 (IMPLIED_BID)
[MDEntryPx] 270 = 110.1875
[MDEntrySize] 271 = 1
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 3 (IMPLIED_OFFER)
[MDEntryPx] 270 = 110.21875
[MDEntrySize] 271 = 3
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = 4 (TRADE)
[MDEntryPx] 270 = 110.2109375
[MDEntrySize] 271 = 1
Market Data Snapshot for non-book entries
<< 10/11/2012 2:58:04 PM [fixmarketdatasnapshot] 34=11480|49=T4|56=T4Example|50=T4FIX|52=20121011-19:58:04.002|55=ZT|48=CME_20121200_ZTZ2|207=CME_F|268=22|269=6|270=110.21875|269=7|270=110.21875|269=7|270=110|269=B|270=0|271=4785|1023=0|269=B|270=110|271=260|1023=1|269=B|270=110.0078125|271=10|1023=2|269=B|270=110.0234375|271=10|1023=3|269=B|270=110.0390625|271=80|1023=4|269=B|270=110.0546875|271=10|1023=5|269=B|270=110.0703125|271=10|1023=6|269=B|270=110.0859375|271=10|1023=7|269=B|270=110.1015625|271=10|1023=8|269=B|270=110.1171875|271=10|1023=9|269=B|270=110.1328125|271=25|1023=10|269=B|270=110.1484375|271=20|1023=11|269=B|270=110.15625|271=50|1023=12|269=B|270=110.1640625|271=35|1023=13|269=B|270=110.1796875|271=25|1023=14|269=B|270=110.1953125|271=156|1023=15|269=B|270=110.203125|271=21|1023=16|269=B|270=110.2109375|271=4012|1023=17|269=B|270=110.21875|271=31|1023=18|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 11480
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20121011-19:58:04.002
[Symbol] 55 = ZT
[SecurityID] 48 = CME_20121200_ZTZ2
[SecurityExchange] 207 = CME_F
[NoMDEntries] 268 = 22
[MDEntryType] 269 = 6 (SETTLEMENT_PRICE)
[MDEntryPx] 270 = 110.21875
[MDEntryType] 269 = 7 (TRADING_SESSION_HIGH_PRICE)
[MDEntryPx] 270 = 110.21875
[MDEntryType] 269 = 7 (TRADING_SESSION_HIGH_PRICE)
[MDEntryPx] 270 = 110
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 0
[MDEntrySize] 271 = 4785
[MDPriceLevel] 1023 = 0
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110
[MDEntrySize] 271 = 260
[MDPriceLevel] 1023 = 1
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0078125
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 2
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0234375
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 3
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0390625
[MDEntrySize] 271 = 80
[MDPriceLevel] 1023 = 4
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0546875
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 5
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0703125
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 6
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.0859375
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 7
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1015625
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 8
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1171875
[MDEntrySize] 271 = 10
[MDPriceLevel] 1023 = 9
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1328125
[MDEntrySize] 271 = 25
[MDPriceLevel] 1023 = 10
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1484375
[MDEntrySize] 271 = 20
[MDPriceLevel] 1023 = 11
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.15625
[MDEntrySize] 271 = 50
[MDPriceLevel] 1023 = 12
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1640625
[MDEntrySize] 271 = 35
[MDPriceLevel] 1023 = 13
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1796875
[MDEntrySize] 271 = 25
[MDPriceLevel] 1023 = 14
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.1953125
[MDEntrySize] 271 = 156
[MDPriceLevel] 1023 = 15
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.203125
[MDEntrySize] 271 = 21
[MDPriceLevel] 1023 = 16
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.2109375
[MDEntrySize] 271 = 4012
[MDPriceLevel] 1023 = 17
[MDEntryType] 269 = B (TRADE_VOLUME)
[MDEntryPx] 270 = 110.21875
[MDEntrySize] 271 = 31
[MDPriceLevel] 1023 = 18
Chart Data Batch Response (UnCompressed)
<< 06/26/2013 05:29:58.522 PM [fixmarketdatasnapshot] 34=14|49=T4|56=T4Example|50=T4FIX|52=20130626-22:29:58.522|262=mdc-6/26/2013 5:29:58 PM-0|55=ZC|48=LVCME_20121200_ZCZ2|207=LVCME_C|965=16|3200=20121213|3201=20121213|3202=09:00:00.000|3203=09:10:00.000|3204=0|3205=2|268=1|269=Y|75=20121213|3210=20|3212=6|3211=20121213|3212=3|3213=20121212-22:59:30.004|3214=6|3212=3|3213=20121212-23:00:00.167|3214=2|3212=0|3206=25|3207=100|3208=MC|3209=12.5|3212=11|3225=20121213-07:09:06.379|3226=2342|3212=12|3222=20121213-07:09:06.379|3223=2445|3212=12|3222=20121213-14:30:52.193|3223=2147|3212=1|3247=20121213-15:04:28.713|3248=1|3249=72100|3250=260|3251=Y|3252=0|3212=1|3247=20121213-15:04:28.713|3248=1|3249=72100|3250=261|3251=Y|3252=0|3212=1|3247=20121213-15:05:03.121|3248=1|3249=72100|3250=262|3251=N|3252=1|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=263|3251=N|3252=2|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=264|3251=N|3252=2|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=265|3251=N|3252=2|3212=1|3247=20121213-15:06:58.047|3248=1|3249=72175|3250=266|3251=N|3252=2|3212=3|3213=20121213-20:00:00.002|3214=7|3212=4|3216=20121213-20:15:06.096|3217=71225|3212=10|3219=20121213-20:15:06.096|3220=71225|3212=3|3213=20121213-20:30:00.020|3214=1|3212=3|3213=20121213-22:00:00.014|3214=5|3212=3|3213=20121213-22:45:00.038|3214=1|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 14
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130626-22:29:58.522
[MDReqID] 262 = mdc-6/26/2013 5:29:58 PM-0
[Symbol] 55 = ZC
[SecurityID] 48 = LVCME_20121200_ZCZ2
[SecurityExchange] 207 = LVCME_C
[SecurityStatus] 965 = 16 (SUCCESS)
[TradeDateStart] 3200 = 20121213
[TradeDateEnd] 3201 = 20121213
[SessionStartTime] 3202 = 09:00:00.000
[SessionEndTime] 3203 = 09:10:00.000
[ChartType] 3204 = 0 (TICK)
[DataFormat] 3205 = 2 (T4BIN)
[NoMDEntries] 268 = 1
[MDEntryType] 269 = Y (CHART_DATA_BATCH)
[TradeDate] 75 = 20121213
[NoChartDatas] 3210 = 20
[Change] 3212 = 6 (TRADE_DATE)
[TradeDateCharts] 3211 = 20121213
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121212-22:59:30.004
[MarketMode] 3214 = 6 (SUSPENDED)
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121212-23:00:00.167
[MarketMode] 3214 = 2 (OPEN)
[Change] 3212 = 0 (NONE)
[Numerator] 3206 = 25
[Denominator] 3207 = 100
[PriceCode] 3208 = MC
[TickValue] 3209 = 12.5
[Change] 3212 = 11 (CLEARED_VOLUME)
[ClearedVolumeTime] 3225 = 20121213-07:09:06.379
[ClearedVolume] 3226 = 2342
[Change] 3212 = 12 (OPEN_INTEREST)
[OpenInterestTime] 3222 = 20121213-07:09:06.379
[OpenInterest] 3223 = 2445
[Change] 3212 = 12 (OPEN_INTEREST)
[OpenInterestTime] 3222 = 20121213-14:30:52.193
[OpenInterest] 3223 = 2147
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:04:28.713
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72100
[TotalTradedVolume] 3250 = 260
[DueToSpread] 3251 = Y
[AtBidOrOffer] 3252 = 0 (BUY)
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:04:28.713
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72100
[TotalTradedVolume] 3250 = 261
[DueToSpread] 3251 = Y
[AtBidOrOffer] 3252 = 0 (BUY)
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:05:03.121
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72100
[TotalTradedVolume] 3250 = 262
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 1 (SELL)
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 263
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 264
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 265
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 1 (TRADE)
[TradeTime] 3247 = 20121213-15:06:58.047
[TradeVolumeCharts] 3248 = 1
[TickValue] 3249 = 72175
[TotalTradedVolume] 3250 = 266
[DueToSpread] 3251 = N
[AtBidOrOffer] 3252 = 2
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-20:00:00.002
[MarketMode] 3214 = 7 (HALTED)
[Change] 3212 = 4 (SETTLEMENT)
[SettlementTime] 3216 = 20121213-20:15:06.096
[Settlement] 3217 = 71225
[Change] 3212 = 10 (HELD_SETTLEMENT)
[HeldSettlementTime] 3219 = 20121213-20:15:06.096
[HeldSettlement] 3220 = 71225
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-20:30:00.020
[MarketMode] 3214 = 1 (PRE_OPEN)
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-22:00:00.014
[MarketMode] 3214 = 5 (CLOSED)
[Change] 3212 = 3 (MARKET_MODE)
[MarketModeTime] 3213 = 20121213-22:45:00.038
[MarketMode] 3214 = 1 (PRE_OPEN)
Chart Data Contract Response (UnCompressed)
<< 01/22/2013 04:50:39.647 PM [fixmarketdatasnapshot] 34=467|49=T4|56=T4Example|50=T4FIX|52=20130122-22:50:39.647|262=mdc-1/22/2013 4:50:39 PM-0|55=ZC|207=LVCME_C|965=16|3200=20120926-05:00:00.000|268=13|269=Z|278=LVCME_20121200_ZCZ2|271=150084|269=Z|278=LVCME_20130300_ZCH3|271=47894|269=Z|278=LVCME_20130500_ZCK3|271=12153|269=Z|278=LVCME_20130700_ZCN3|271=13963|269=Z|278=LVCME_20130900_ZCU3|271=1256|269=Z|278=LVCME_20131200_ZCZ3|271=4963|269=Z|278=LVCME_20140300_ZCH4|271=218|269=Z|278=LVCME_20140500_ZCK4|271=80|269=Z|278=LVCME_20140700_ZCN4|271=52|269=Z|278=LVCME_20140900_ZCU4|271=5|269=Z|278=LVCME_20141200_ZCZ4|271=174|269=Z|278=LVCME_20150700_ZCN5|271=5|269=Z|278=LVCME_20151200_ZCZ5|271=38|
[FIXMARKETDATASNAPSHOT]
[MsgSeqNum] 34 = 467
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SenderSubID] 50 = T4FIX
[SendingTime] 52 = 20130122-22:50:39.647
[MDReqID] 262 = mdc-1/22/2013 4:50:39 PM-0
[Symbol] 55 = ZC
[SecurityExchange] 207 = LVCME_C
[SecurityStatus] 965 = 16 (SUCCESS)
[TradeDateStart] 3200 = 20120926-05:00:00.000
[NoMDEntries] 268 = 13
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20121200_ZCZ2
[MDEntrySize] 271 = 150084
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130300_ZCH3
[MDEntrySize] 271 = 47894
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130500_ZCK3
[MDEntrySize] 271 = 12153
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130700_ZCN3
[MDEntrySize] 271 = 13963
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20130900_ZCU3
[MDEntrySize] 271 = 1256
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20131200_ZCZ3
[MDEntrySize] 271 = 4963
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140300_ZCH4
[MDEntrySize] 271 = 218
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140500_ZCK4
[MDEntrySize] 271 = 80
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140700_ZCN4
[MDEntrySize] 271 = 52
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20140900_ZCU4
[MDEntrySize] 271 = 5
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20141200_ZCZ4
[MDEntrySize] 271 = 174
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20150700_ZCN5
[MDEntrySize] 271 = 5
[MDEntryType] 269 = Z (CHART_DATA_CONTRACT)
[MDEntryID] 278 = LVCME_20151200_ZCZ5
[MDEntrySize] 271 = 38
Binary Data Encoding: Processing Market Data Snapshots in Binary FormThe CTS market data engine provides (raw) market data to all its internal clients (including FIX API, T4 API and T4Screen) in binary snapshot form.
To conform to common practices within the FIX standard, the FIX API converts this binary snapshot data to
Market Data Snapshots (Tag 35=W) and/or
Market Data Incremental Refresh (Tag 35=X) messages.
As such, the CTS binary depth books are converted to standard FIX tags (e.g. MDEntries tags - MDPriceLevel, MDEntrySize, MDEntryPx, etc.) that convey (to FIX API clients) the trade and depth composition of the markets.
This is the standard mechanism used in the construction of Market Data Snapshot (Tag 35=W) and Market Data Incremental Refresh (Tag 35=X) messages.
Binary Data Encoding provides an alternative mechanism to build and consume FIX
Market Data Snapshots (Tag 35=W). With Binary Data Encoding, the FIX conversion process (to standard tags) is substituted by the Base64 encoding of the binary snapshot packet.
This Base64-encoded snapshot contains the complete and unaltered binary market data structure generated by the CTS market data engine. The binary data include all levels and books available for the requested market.
Binary Data Encoding is requested with the
Market Data Request (Tag 35=V) message with a Subscription Request Type of Snapshot + Updates (Tag 263=1) with a Data Format of Uncompressed Encoded (Tag 3205=E).
UnEncoding PacketsThe Base64-encoded packet is included in the EncodedText field (Tag 355) of the Market Data Snapshot message. In a sole MDEntry, the packet is identified as uncompressed encoded data (ExecInst - Tag 18=E).
The MDEntryType would further describe the packet as Packet-Depth-Encoded (Tag 269=d) for Depth Snapshots or Packet-Trade-Encoded (Tag 269=t) for Trade Snapshots.
At the FIX API client end, the Base64-encoded text can be unencoded by standard methods. The resultant (unencoded) binary data will be identical to the binary message received by T4Screen front-end clients.
Parsing Unencoded Binary dataParsing of the (unencoded) binary snapshot data will allow the FIX client to navigate and consume Trade and Depth Book prices and quantities.
The little-endian structures of the (unencoded) binary data are presented below for both Packet-Depth-Encoding and Packet-Trade-Encoding.
1. Packet-Depth-Encoded Structure (Tag 269=d)
Offset in parentheses is representative of VolSize=4, TickSize=1 with LastTradeAndSpreadFlag and ImpliedDataOldFlag not set (i.e. False) and 10 levels of book depth (BidCount=OfferCount=10). No implied bids or offers (ImpBidCount=ImpOfferCount=0).
Name | # of Bytes | Offset | Description |
---|
MarketIndent | 4 | 0 | Ident of the market. |
Numerator* | 4 | 4 | Price Numerator. |
TickSize* | 1 | 8 | Size of Tick Fields. Usually equal to 1. |
VolSize* | 1 | 9 | Size of Volume Fields. Usually equal to 2 or 4. |
Mode | 1 | 10 | Market Mode. |
Time | 8 | 11 | Time of packet (in ticks). |
TotalTradedVolume* | 4 | 19 | Total Traded Volume. |
Sequence | 8 | 23 | Internal Sequence. |
ChangeBuffer | 1 | 31 | Change Buffer for this snapshot. |
ChangeLevels | 1 | 32 | Change Levels for this snapshot. |
BaseTicks (LastTradeTicks)* | 4 | 33 | Base ticks. Last Trade Ticks (if not a spread). |
LastTradeTotalVolume* | VolSize | 37 | Total volume traded at the last trade price since it became the last trade price (including spread leg trades if applicable). |
LastTradeVolume* | VolSize | (41) | Last trade volume that actually occurred (including spread leg trades if applicable). |
LastTradeAndSpreadFlag* | 1 | (45) | Boolean for Spread ticks and volume. |
SpreadLastTradeTickDelta* | TickSize | | if LastTradeAndSpreadFlag is true. Trade Ticks Spread Delta. (SpreadLastTradeTicks = BaseTicks + SpreadLastTradeTickDelta*Numerator). |
SpreadLastTradeTotalVolume* | VolSize | | if LastTradeAndSpreadFlag is true. Total Volume of Spread. |
SpreadLastTradeVolume* | VolSize | | if LastTradeAndSpreadFlag is true. Volume of Spread. |
ImpliedDataOldFlag | 1 | (46) | Boolean for Old implied data. |
BidImpliedTicks | TickSize | | if ImpliedDataOldFlag is 1 or 3. Old Bid Implied Ticks. |
BidImpliedVolume | VolSize | | if ImpliedDataOldFlag is 1 or 3. Old Bid Implied Volume. |
OfferImpliedTicks | TickSize | | if ImpliedDataOldFlag is 2 or 3. Old Offer Implied Ticks. |
OfferImpliedVolume | VolSize | | if ImpliedDataOldFlag is 2 or 3. Old Offer Implied Volume. |
BidCount* | 1 | (47) | Number of Bids. Repeat in pairs (TickDelta and Volume). |
BidTickDelta* | TickSize | | Repeat (in pairs with BidVolume) For BidCount. Bid Tick Delta. (BidTick = BaseTicks + BidTickDelta*Numerator). |
BidVolume* | VolSize | | Repeat (in pairs with BidTickDelta) For BidCount. Bid Volume. |
OfferCount* | 1 | (98) | Number of Offers. Repeat in pairs (TickDelta and Volume). |
OfferTickDelta* | TickSize | | Repeat (in pairs with OfferVolume) For OfferCount. Offer Tick Delta. (OfferTick = BaseTicks + OfferTickDelta*Numerator). |
OfferVolume* | VolSize | | Repeat (in pairs with OfferTickDelta) For OfferCount. Offer Volume. |
ImpBidCount* | 1 | (149) | Number of Implied Bids. Repeat in pairs (TickDelta and Volume). |
ImpBidTickDelta* | TickSize | | Repeat For (in pairs with ImpBidVolume) ImpBidCount. Implied Bid Tick Delta. (ImpBidTick = BaseTicks + ImpBidTickDelta*Numerator). |
ImpBidVolume* | VolSize | | Repeat (in pairs with ImpBidTickDelta) For ImpBidCount. Implied Bid Volume. |
ImpOfferCount* | 1 | (150) | Number of Implied Offers. Repeat in pairs (TickDelta and Volume). |
ImpOfferTickDelta* | TickSize | | Repeat (in pairs with ImpOfferVolume) For ImpOfferCount. Implied Offer Tick Delta. (ImpOfferTick = BaseTicks + ImpOfferTickDelta*Numerator). |
ImpOfferVolume* | VolSize | | Repeat (in pairs with ImpOfferTickDelta) For ImpOfferCount. Implied Offer Volume. |
DueToSpread* | 1 | (151) | Whether this trade was due to a spread or not. Boolean. |
BidOrOffer* | 1 | (152) | Whether this trade was at the bid or offer price. 1 = Buy, -1 = Sell. |
MarketIDLength | 1 | (153) | Number Of bytes for MarketID. If available. |
MarketID | MarketIDLength | (154) | MarketID. |
2. Packet-Trade-Encoded Structure (Tag 269=t)
Offset in parentheses is indicative of a MarketID of length 17 (e.g. "CME_20140300_ESH4")
Name | # of Bytes | Offset | Description |
---|
MarketIDLength | 1 | (0) | Number Of bytes for MarketID. If available. |
MarketID | MarketIDLength | | MarketID. |
Time | 8 | (18) | Time of packet (in ticks). |
LastTradeTotalVolume* | 4 | (26) | Total volume traded at the last trade price since it became the last trade price. |
LastTradeTicks* | 4 | (30) | Last Trade Ticks. |
LastTradeVolume* | 4 | (34) | Last trade volume that actually occurred. |
Sequence | 8 | (38) | Internal Sequence. |
DueToSpread* | 1 | (46) | Whether this trade was due to a spread or not. Boolean. |
BidOrOffer* | 1 | (47) | Whether this trade was at the bid or offer price. 1 = Buy, -1 = Sell. |
Sample Messages - Binary Data EncodingSample messages for a Binary Encoding session are shown below. In the first message, the binary Encoding session is requested for Bid (Tag 269=0), Offer (Tag 269=1), ImpliedBid (Tag 269=2) and ImpliedOffer (Tag 269=3) books with a depth of 10 price levels (Tag 264=10) alongside trade Market Data snapshots (Tag 269=4).
Following, two types of encoded Market Data Snapshot messages are received: (1) A Packet Depth Encoded snapshot (Tag 269=d) and (2) A Packet Trade Encoded Snapshot (Tag 269=t).
In both cases, the binary snapshot is carried (as Base-64 encoded data) in the EncodedText field (Tag 355).
The EncodedText of the Packet Depth Snapshot (sequence number 76) would conform to the structure of Table 1 above.
The EncodedText of the Packet Trade Snapshot (sequence number 77) would conform to the structure of Table 2 above.
Requesting Binary Encoding Session
1 - MARKETDATAREQUEST
34=3|49=T4Example|56=T4|52=20131125-18:12:48.773|262=121248|263=1|264=10|265=3|1070=1|267=11|269=0|269=1|269=2|269=3|269=4|269=6|269=7|269=8|269=K|269=L|269=B|146=1|55=ES|48=CME_20131200_ESZ3|167=FUT|207=CME_Eq|3205=E|
[MsgSeqNum] 34 = 3
[SenderCompID] 49 = T4Example
[TargetCompID] 56 = T4
[SendingTime] 52 = 20131125-18:12:48.773
[MDReqID] 262 = 121248
[SubscriptionRequestType] 263 = 1 (SNAPSHOT_PLUS_UPDATES)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 3 (SMART_TRADE)
[MDQuoteType] 1070 = 1 (TICKS)
[NoMDEntryTypes] 267 = 11
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (IMPLIED_BID)
[MDEntryType] 269 = 3 (IMPLIED_OFFER)
[MDEntryType] 269 = 4 (TRADE)
[MDEntryType] 269 = 6 (SETTLEMENT_PRICE)
[MDEntryType] 269 = 7 (TRADING_SESSION_HIGH_PRICE)
[MDEntryType] 269 = 8 (TRADING_SESSION_LOW_PRICE)
[MDEntryType] 269 = K (LIMIT_HIGH_PRICE)
[MDEntryType] 269 = L (LIMIT_LOW_PRICE)
[MDEntryType] 269 = B (TRADE_VOLUME)
[NoRelatedSym] 146 = 1
[Symbol] 55 = ES
[SecurityID] 48 = CME_20131200_ESZ3
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = CME_Eq
[DataFormat] 3205 = E (UNCOMPRESSED_ENCODED)
A Packet Depth Encoded Snapshot
2 - MARKETDATASNAPSHOT
34=76|49=T4|56=T4Example|52=20131125-18:13:02.163|48=CME_20131200_ESZ3|387=667827|965=2|268=1|269=d|18=E|354=148|355=JwgAABkAAACBgoLg65XS7rfQCLMwCgD+/////////4SBfsACAAoAAQABgIqA7QJ/wgN+HwV9LQV82wR79QR6EAZ5SAR4PQh3DwWKgZ0DglIGg4sGhBAGhQkGhhAHh0QFiFAGiQsFigMHgIABgQA=|
[MsgSeqNum] 34 = 76
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SendingTime] 52 = 20131125-18:13:02.163
[SecurityID] 48 = CME_20131200_ESZ3
[TotalVolumeTraded] 387 = 667827
[SecurityStatus] 965 = 2 (OPEN)
[NoMDEntries] 268 = 1
[MDEntryType] 269 = d (PACKET_DEPTH_ENCODED)
[ExecInst] 18 = E (UNCOMPRESSED_ENCODED)
[EncodedTextLen] 354 = 148
[EncodedText] 355 = JwgAABkAAACBgoLg65XS7rfQCLMwCgD+/////////4SBfsACAAoAAQABgIqA7QJ/wgN+HwV9LQV82wR79QR6EAZ5SAR4PQh3DwWKgZ0DglIGg4sGhBAGhQkGhhAHh0QFiFAGiQsFigMHgIABgQA=
A Packet Trade Encoded Snapshot
3 - MARKETDATASNAPSHOT
34=77|49=T4|56=T4Example|52=20131125-18:13:02.256|48=CME_20131200_ESZ3|387=667837|268=1|269=t|273=20131125-18:13:02.362|274=2|18=E|354=64|355=EUNNRV8yMDEzMTIwMF9FU1ozoNeo0u630Ai9MAoAfsACAAoAAAD+/////////wGB|
[MsgSeqNum] 34 = 77
[SenderCompID] 49 = T4
[TargetCompID] 56 = T4Example
[SendingTime] 52 = 20131125-18:13:02.256
[SecurityID] 48 = CME_20131200_ESZ3
[TotalVolumeTraded] 387 = 667837
[NoMDEntries] 268 = 1
[MDEntryType] 269 = t (PACKET_TRADE_ENCODED)
[MDEntryTime] 273 = 20131125-18:13:02.362
[TickDirection] 274 = 2 (MINUS_TICK)
[ExecInst] 18 = E (UNCOMPRESSED_ENCODED)
[EncodedTextLen] 354 = 64
[EncodedText] 355 = EUNNRV8yMDEzMTIwMF9FU1ozoNeo0u630Ai9MAoAfsACAAoAAAD+/////////wGB
FIX API Home Page.